//
//  LYProtocolViewController.m
//  artist
//
//  Created by Jay_Apple on 16/5/30.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYProtocolViewController.h"


@interface LYProtocolViewController ()

@property (nonatomic, weak) UITextView *textView;

@end

@implementation LYProtocolViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title =  @"服务协议";
}


- (void)viewDidLayoutSubviews{

    [super viewDidLayoutSubviews];
    
    [self.view addSubview:self.textView];
}



- (UITextView *)textView{

    if (_textView == nil) {
        UITextView *textView = [[UITextView alloc]initWithFrame:self.view.bounds];
        textView.editable = NO;
        textView.textAlignment = NSTextAlignmentLeft;
        NSString * str = [NSString stringWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"protocol" ofType:@"txt"] encoding:NSUTF8StringEncoding error:nil];
        textView.text = str;
        [self.view addSubview:textView];
        _textView = textView;

    }
    return _textView;
}


@end
